function sendSuccess(res, data, message = '成功', statusCode = 200) {
    res.status(statusCode).json({
      code: statusCode,
      message,
      data
    });
  }
  
  function sendError(res, message = '服务器错误', statusCode = 500) {
    res.status(statusCode).json({
      code: statusCode,
      message
    });
  }
  
  module.exports = { sendSuccess, sendError };